package DAO;

 
import java.util.List;

import model.FollowPlan;
import model.Incident;
import model.Person;
  
 
public interface Userdao {
	/*	*//**
	 * 按名读取用户信息
	 * 
	 * @param fname
	 * @return
	 */
	/*
	 * public User search(String fname);
	 *//**
	 * 按ID读取用户信息
	 * 
	 * @param id
	 * @return
	 */
	/*
	 * public User search(int id);
	 *//**
	 * 读取person所有信息
	 * 
	 * @return
	 */
 	public List<Person> searchPerson();
	
 	/**
 	 * incident
 	 * @return
 	 */
	public List<Incident> searchIncident();
	
	/**
	 * plan
	 * @return
	 */
	public List<FollowPlan> searchPlan();
	/**
	 * insert person
	 * @param fname
	 * @param lname
	 * @param position
	 * @param phone
	 * @param email
	 * @param age
	 * @param sex
	 */
	public void insert(String fname,String lname,String position, int phone, String email, int age, String sex);
	
	/**
	 * insert incident
	 * @param incident_location
	 * @param Gen_des
	 */
	public void insertIncident(String incident_location,String Gen_des,String intal);
	
	/**
	 * insert plan 
	 * @param type
	 * @param des
	 */
	public void insertPlan(String type,String des);

	/*----------------------------------------------*/	
/*----------------------------------------------*/	
/*----------------------------------------------*/		
	/**
	 * find the person to edit
	 * @param id
	 * @return
	 */
	public Person findPerson(int id);
	
	/**
	 * find the incident to edit 
	 * @param id
	 * @return
	 */
	public Incident findIncident(int id);
	
	/**
	 * find the plan to edit
	 * @param id
	 * @return
	 */
	public FollowPlan findPlan(int id);
	
	/**
	 * updatePerson
	 * @param type
	 * @param id
	 * @param info
	 */
	public void updatePerson(String type, int id, String info);
	
	public void deletePerson(int id);
	
	/**
	 * updateIncident
	 * @param type
	 * @param id
	 * @param info
	 */
	public void updateIncident(String type,int id,String info);
	public void deleteIncident(int id);
	
	/**
	 * updatePlan
	 * @param type
	 * @param id
	 * @param info
	 */
	public void updatePlan(String type,int id,String info);
	public void deletePlan(int id);
}
